package com.mentaleye.dal.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mentaleye.dal.dao.TimeTableClassDao;
import com.mentaleye.dal.model.TimeTableClass;
import com.mentaleye.dal.model.TimeTableClassExample;
import com.mentaleye.dal.model.TimeTableClassKey;
import com.mentaleye.dal.service.TimeTableClassMapper;

@Repository
public class TimeTableClassDaoImpl extends BaseDao implements TimeTableClassDao{

	@Autowired private TimeTableClassMapper timeTableClassMapper;
	
	@Override
	public boolean insert(TimeTableClass record){
		return getResultByInt(timeTableClassMapper.insertSelective(record));
	}
	
	@Override
	public boolean update(TimeTableClass record){
		return getResultByInt(timeTableClassMapper.updateByPrimaryKeySelective(record));
	}
	
	@Override
	public boolean delete(TimeTableClassKey key){
		return getResultByInt(timeTableClassMapper.deleteByPrimaryKey(key));
	}
	
	@Override
	public boolean deleteList(List<TimeTableClassKey> keylist){
		return getResultByInt(timeTableClassMapper.deleteByList(keylist));
	}
	
	@Override
	public TimeTableClass selectByKey(TimeTableClassKey key){
		return timeTableClassMapper.selectByPrimaryKey(key);
	}
	
	@Override
	public List<TimeTableClass> selectByExample(TimeTableClassExample example){
		return timeTableClassMapper.selectByExample(example);
	}
	
	@Override
	public List<TimeTableClass> selectByMap(Map<String, Object> map){
		return timeTableClassMapper.selectByMap(map);
	}
}
